def today = new Date()
assert today.class == Date
assert today.class == java.util.Date
//assert Date == java.util.Date

println 'today    :' + today
println 'yesterday:' + today.minus(1)
println 'tomorrow :' + today.plus(1)
println 'yesterday:' + today.previous()
println 'tomorrow :' + today.next()

assert today.after(today.previous())
assert today.before(today.next())

println today.time

println String.format('%tF', today)
println String.format('%tT', today)

def cal = Calendar.instance
println 'cal:' + cal
println 'year:' + cal.get(Calendar.YEAR) 
println 'month:' + cal.get(Calendar.MONTH)
println 'day:' + cal.get(Calendar.DAY_OF_MONTH)
println cal.timeInMillis

println 'The End'